package top.zsyle.sycc.exception;

import lombok.Getter;

@Getter
public enum GlobalExceptionEnum {
    OK("1","操作成功！"),
    ERROR("-1","系统异常！"),
    PARAM_IS_NULL_EXCEPTION("2","空参数异常！"),
    PARAM_VALIDATION_EXCEPTION("3", "参数校验异常！"),
    //10XXX 开头的为 system 服务异常码

    //20XXX 开头的为 uaa 服务异常码

    //30XXX 开头的为 user 服务异常码
    USER_PHONE_CODE_IS_OVERTIME_EXCEPTION("30001","短信验证码已过期，请重新获取！"),
    USER_CODE_IS_UNEQUAL_EXCEPTION("30002","短信验证码不正确！"),
    USER_PHONE_IS_EXIST_EXCEPTION("30003","该电话已经注册了！"),
    //40XXX 开头的为 comm 服务异常码
    COMM_PHONE_FORMAT_EXCEPTION("40001","电话号码格式异常！"),
    COMM_IMAGE_CODE_IS_NULL_EXCEPTION("40002","图片验证码为空！"),
    COMM_IMAGE_CODE_IS_UNEQUAL_EXCEPTION("40003","图片验证码不正确！"),
    COMM_NO_MORE_THAN_INTERVAL_TIME_EXCEPTION("40004","间隔时间不能小于60秒，请稍后发送！"),
    COMM_COURSE_IS_EXIST_EXCEPTION("40005","该课程已经存在！"),
    ;



    private String code;

    private String message;

    GlobalExceptionEnum(String code,String message) {
        this.message = message;
        this.code = code;
    }
}
